package am.fp.events
{                                    
  import flash.display.MovieClip;
  import flash.events.Event;
  
  public class StatusEvent extends Event
  {  
    // event type
    public static const CHANGE: String = "statusChange";

    // status values
    public static const NO_DOC: String = "noDoc";
    public static const LOADING_DOC: String = "loadingDoc";
    public static const DOC_LOADED: String = "docLoaded";
    public static const LANG_LOADED: String = "langLoaded";
    public static const SHOW_ABOUT: String = "showAbout";
                        
    protected var m_status: String;
    protected var m_docMC: MovieClip;
    public function get status(): String    { return m_status; }
    public function get docMC() : MovieClip { return m_docMC;  }
    
    public function StatusEvent(type: String, status: String, docMC: MovieClip = null)
    { 
      if (status == DOC_LOADED && (docMC == null || docMC.numChildren == 0))
      {
        m_status = NO_DOC;
        docMC = null;
      }
      
      m_status = status;
      m_docMC = docMC;
      super(type, false, false);
    }
  }
}
